package programs;

import java.util.ArrayList;
import program.*;
import traces.*;

public class d6_c1 {     

    public static Main create(){
        int i= 0;
        ArrayList<Actor> actors= new ArrayList<Actor>();
        
        ObjectClass myTypeClass_id41= new ObjectClass("MyType");
        ObjectClass myType2Class_id42= new ObjectClass("MyType2");
        
        Actor myYesLvl3 = new Actor("myYesLvl3", myTypeClass_id41); 
        actors.add(myYesLvl3);
        Actor myNoLvl3 = new Actor("myNoLvl3", myType2Class_id42); 
        actors.add(myNoLvl3);
        
        
        /* LOOP: loop_id46 */
         
         
             Call m1_id47 = new Call(new Statement("S" + i++,myYesLvl3,new Method("m1",new ArrayList<ObjectInstance>(),myTypeClass_id41),myYesLvl3));        
        Loop loop_id46 = new Loop(m1_id47);
         
         /* CONSEQUENT: alt_id48 */
         
         
             Call m3_id51 = new Call(new Statement("S" + i++,myNoLvl3,new Method("m3",new ArrayList<ObjectInstance>(),myTypeClass_id41),myYesLvl3));        
        
         
         /* ALTERNATIVE 0: alt_id48 */
         
         
             Call m1_id52 = new Call(new Statement("S" + i++,myNoLvl3,new Method("m1",new ArrayList<ObjectInstance>(),myTypeClass_id41),myYesLvl3));        
        
        // FINALIZING alt_id48
        Alt alt_id48= new Alt();
        alt_id48.add(m3_id51);
        alt_id48.add(m1_id52);
        
        double[] alt_probs_id49= new double[2];
        alt_probs_id49[0]= 0.0;
        alt_probs_id49[0]= 0.0;
        alt_id48.setProbas(alt_probs_id49);
        
        
        /* LOOP: loop_id54 */
         
         
             Call m1_id55 = new Call(new Statement("S" + i++,myYesLvl3,new Method("m1",new ArrayList<ObjectInstance>(),myTypeClass_id41),myYesLvl3));        
        Loop loop_id54 = new Loop(m1_id55);
        
        
            Call m6_id56 = new Call(new Statement("S" + i++,myNoLvl3,new Method("m6",new ArrayList<ObjectInstance>(),myTypeClass_id41),myYesLvl3));        
        
        ArrayList<Block> entry_point_id57 = new ArrayList<Block>();
        entry_point_id57.add(loop_id46);
        entry_point_id57.add(alt_id48);
        entry_point_id57.add(loop_id54);
        entry_point_id57.add(m6_id56);
        return new Main(entry_point_id57, actors, 200);
    } 
    
    public static void main(String[] args) {
        Main sd=create();
        boolean ok=sd.saveModel("d6");
        if (ok){
            sd.genereAllTraces("d6", 100);
        }
        
        
        /* from config c1 */
        Evaluator evaluator= new Evaluator(
        new Evaluator_Config() {

            @Override
            public void config() {
                new MemUsed();
            }
        });
        
        System.out.println("Begin evaluation with c1: ");
        evaluator.eval("");
        System.out.println("End evaluation with c1");
        
    }
}
